package com.miku.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.miku.model.dto.credit.CreditQueryRequest;
import com.miku.model.entity.Credit;

/**
* @author ThinkBook
* @description 针对表【credit(积分表)】的数据库操作Service
* @createDate 2024-07-15 15:31:42
*/
public interface CreditService extends IService<Credit> {

    /**
     * 获取查询条件
     * @param creditQueryRequest
     * @return
     */
    QueryWrapper<Credit> getQueryWrapper(CreditQueryRequest creditQueryRequest);

    /**
     * 消费积分
     * @param userId
     * @param credits
     * @return
     */

    public Boolean consumeCredits(Long userId, long credits);
}
